program One;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
a, b, c, i, min: integer;

begin
  readln (a);
  readln (b);
  readln (c);
  if (a>b) then
    min:=b
  else
    min:=a;
  if (c<min) then
    min:=c;
  for i:=1 to min do
    if (a mod i = 0) and (b mod i = 0) and (c mod i = 0) then
      write (i, '; ');
  readln;    
end.
 